﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="details.aspx.vb" Inherits="WuggiSum.details" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <br />
    </p>
    <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="100%"  HeaderStyle-Width="35%" DataSourceID="WugSourceDetails">
    <fields>
    <asp:BoundField DataField="m_title" HeaderText="Title"  />
            <asp:BoundField DataField="m_desc" HeaderText="Description" >
                <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:ImageField DataImageUrlField="m_poster"  DataImageUrlFormatString="/images/{0}" HeaderText="Posters" SortExpression="m_poster">
                <ItemStyle HorizontalAlign="Center" />
                <ControlStyle CssClass="ImageTrueSize" />
                <ItemStyle HorizontalAlign="Center" />
            </asp:ImageField>
            <asp:BoundField DataField="m_pg" HeaderText="PG Rating"  >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="m_starring" HeaderText="Starring"  >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="m_duration" HeaderText="Duration"  >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="m_year" HeaderText="Year" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="s_genre" HeaderText="Subgenre" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
    </fields>
   
    </asp:DetailsView>
    <asp:SqlDataSource ID="WugSourceDetails" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        
        SelectCommand="SELECT a.[m_id], a.[m_title], a.[m_desc], a.[m_pg], a.[m_year], a.[m_starring], a.[m_duration], b.[s_genre], a.[m_poster], b.[sub_id] FROM [movies] a, [subgenre] b WHERE a.[sub_id] = b.[sub_id] and (a.[m_id] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="m_id" QueryStringField="WuggiQuery" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <p>
    </p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="r_id" DataSourceID="SqlDataSource1" Width="100%">
            <Columns>
                <asp:BoundField DataField="r_title" HeaderText="Title" SortExpression="r_title" />
                <asp:BoundField DataField="r_review" HeaderText="Description" SortExpression="r_review" />
                <asp:BoundField DataField="r_addby" HeaderText="By" SortExpression="r_addby" />
                <asp:BoundField DataField="r_addd" HeaderText="Date/Time" SortExpression="r_addd" />
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [r_title], [r_review], [m_id], [r_addd], [r_addby], [r_id] FROM [reviews] WHERE ([m_id] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="m_id" QueryStringField="WuggiQuery" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p style="text-align: center">
        <asp:Button ID="add_review" runat="server"  Text="Add Review" />
    </p>
    <p>
    </p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
